<?php
/**
 * @package WordPress
 * @subpackage Default_Theme
 */
// shopping cart seesion start and add to cart
session_start();
add_toCart();
// validations and order
if(isset($_POST[step2])){
	$feedback = check_address_form();
	if($feedback[error] == 0){	// if address data ok + terms accepted we move on 
		process_order(2);
		$url = 'Location:' . get_real_base_url() .'/?orderNow=3';
		header($url);
		exit(NULL);
	}
}
if(isset($_POST[step3])){	
		process_order(4);
		$url = 'Location:' . get_real_base_url() .'/?orderNow=4';
		header($url);  
		exit(NULL);
}
// show what's in the cart
if($_GET[showCart] == '1'){
	
		if($_POST[update] == 'Update'){
			update_cart();
		}
		
		$CART = show_cart();
}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
<head profile="http://gmpg.org/xfn/11">

<title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> &raquo; Blog Archive <?php } ?> <?php wp_title(); ?></title>

<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<meta http-equiv="content-type" content="<?php bloginfo('html_type') ?>; charset=<?php bloginfo('charset') ?>" />
<meta name="description" content="<?php bloginfo('description') ?>" />
<meta name="verify-v1" content="zVyQ2GBPsiC2xYrJLF/oise3SkzRfv7eJ4HtAB5GXWE=" />

<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="alternate" type="application/atom+xml" title="<?php bloginfo('name'); ?> Atom Feed" href="<?php bloginfo('atom_url'); ?>" />
<link type="text/css" media="print" rel="stylesheet" href="<?php bloginfo('template_url'); ?>/css/print.css" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<link rel="SHORTCUT ICON" href="<?php bloginfo('stylesheet_directory'); ?>/images/favicon.ico" />
<style type="text/css" media="screen">
<?php
// Checks to see whether it needs a sidebar or not
if ( !empty($withcomments) && !is_single() ) {
?>
	#page { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickbg-<?php bloginfo('text_direction'); ?>.jpg") repeat-y top; border: none; }
<?php } else { // No sidebar ?>
	#page { background: url("<?php bloginfo('stylesheet_directory'); ?>/images/kubrickbgwide.jpg") repeat-y top; border: none; }
<?php } ?>
</style>

<?php	if ( is_singular() ) wp_enqueue_script( 'comment-reply' );
		wp_head(); 
?>

<!-- 
include flowplayer JavaScript file that does Flash embedding and provides the Flowplayer API.
-->
<script src="<?php bloginfo('template_url'); ?>/js/jquery-1.2.6.min.js" type="text/javascript"></script>
<script src="<?php bloginfo('template_url'); ?>/js/myjquery.js" type="text/javascript"></script>
<!--[if lt IE 8]> 
<script src="<?php bloginfo('template_url'); ?>/js/IE8.js" type="text/javascript"></script>
<![endif]-->
	
<?php
	global $options;
	foreach ($options as $value) {
		 if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_settings( $value['id'] ); }
	}
?>
</head>

<body>
<?php if(check_sid())
{ // warning in case browser blocks all cookies
  #echo "<div>Cookies need to be accepted in your browser. Pls. change your settings.</div>";
} ?>
<center>
<h1><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1>
<!-- <a href="<?php echo get_option('home'); ?>/" style="color:#000000;" title="<?php bloginfo('name'); ?> - <?php bloginfo('description'); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/softlogs.png" border="0" alt="<?php bloginfo('name'); ?> - <?php bloginfo('description'); ?>"></a> -->
<br/>
<!-- Google CSE Search Box -->
<form action="http://www.getkreativ.com/search/" id="cse-search-box">
  <div>
    <input type="hidden" name="cx" value="006157394399895179174:dnkmiw7oery" />
    <input type="hidden" name="cof" value="FORID:10" />
    <input type="hidden" name="ie" value="UTF-8" />
    <input type="text" name="q" size="45" />
    <input type="submit" name="sa" value="Search" class="button"/>
  </div>
</form>
<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script>
<!-- End Google CSE Search Box -->
<br/>
<font style="color:#cccccc;">
<a href="http://www.getkreativ.com">Home</a>  &#8226; 
<a href="http://www.getkreativ.com/category/news/">Cat1</a> &#8226; 
<a href="http://www.getkreativ.com/category/news/">Cat2</a> &#8226; 
<a href="http://www.getkreativ.com/category/news/">Cat3</a>
</font><br/>
</center>

